/****************************************************************
 *  This file created by writerB.php on 05/08/2007 at 20:45:32  *
 ****************************************************************
 *  writerB.php created by Tonk (tonk@ctonk.com) in 2007        *
 ****************************************************************
 *                 General Document Information
 *
 *  File Name: account.h
 *  Class Name: Account
 *  Parent Classes: none
 *  Data members: 2
 *  Notes:
 ****************************************************************/

#ifndef __H_ACCOUNT
#define __H_ACCOUNT

#include <iostream>



class Account {
	protected:
		// Protected data...
		int		_AccountID;	// Holds a unique value for every instantiation.
		std::string	_name;
		std::string	_password;

		// Protected methods...
		void	setAccountID( const int& AccountID );

	public:
		// Constructors...
		Account();
		Account( const std::string& name, const std::string& password );
		Account( const Account& );	// Doesn't change _AccountID
		~Account();

		// Operators...
		Account& operator = ( const Account& );		// Doesn't change _AccountID
		bool operator == ( const Account& ) const;	// Doesn't compare _AccountIDs
		bool operator != ( const Account& ) const;	// Doesn't compare _AccountIDs
		bool operator < ( const Account& ) const;	// Compares _AccountIDs
		bool operator > ( const Account& ) const;	// Compares _AccountIDs

		// Public accessor methods...
		int		getAccountID( void ) const;
		void	setName( const std::string& name );
		std::string	getName( void ) const;
		void	setPassword( const std::string& password );
		std::string	getPassword( void ) const;

		// General methods...

		// Static data...
		static int	accountIndex;	// Used to create a unique id for every Account object
		static int	numAccounts;	// Keeps track of the total number of Account objects

		// Static methods...
};

// Associated operators...
std::ostream& operator << ( std::ostream& write, Account& account );
std::ostream& operator << ( std::ostream& write, Account* account );
std::istream& operator >> ( std::istream& read, Account& account );
std::istream& operator >> ( std::istream& read, Account* account );



#endif // __H_ACCOUNT
